package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BrandManagementMapper;
import com.ruoyi.system.domain.BrandManagement;
import com.ruoyi.system.service.IBrandManagementService;

/**
 * 商品品牌管理Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-28
 */
@Service
public class BrandManagementServiceImpl implements IBrandManagementService
{
    @Autowired
    private BrandManagementMapper brandManagementMapper;

    /**
     * 通过id查询商品品牌管理
     *
     * @param id 商品品牌管理主键
     * @return 商品品牌管理
     */
    @Override
    public BrandManagement selectBrandManagementById(Long id)
    {
        return brandManagementMapper.selectBrandManagementById(id);
    }

    /**
     * 通过品牌名称查询商品品牌管理列表
     *
     * @param brandName 品牌名称
     * @return 商品品牌管理
     */
    @Override
    public List<BrandManagement> selectBrandManagementListByName(String brandName)
    {
        return brandManagementMapper.selectBrandManagementListByName(brandName);
    }

    /**
     * 新增商品品牌管理
     *
     * @param brandManagement 商品品牌管理
     * @return 结果
     */
    @Override
    public int insertBrandManagement(BrandManagement brandManagement)
    {
        return brandManagementMapper.insertBrandManagement(brandManagement);
    }

    /**
     * 修改商品品牌管理
     *
     * @param brandManagement 商品品牌管理
     * @return 结果
     */
    @Override
    public int updateBrandManagement(BrandManagement brandManagement)
    {
        return brandManagementMapper.updateBrandManagement(brandManagement);
    }

    /**
     * 通过id批量删除商品品牌管理信息
     *
     * @param ids 需要删除的商品品牌管理主键
     * @return 结果
     */
    @Override
    public int deleteBrandManagementByIds(Long[] ids)
    {
        return brandManagementMapper.deleteBrandManagementByIds(ids);
    }

    /**
     * 通过id删除商品品牌管理信息
     *
     * @param id 商品品牌管理主键
     * @return 结果
     */
    @Override
    public int deleteBrandManagementById(Long id)
    {
        return brandManagementMapper.deleteBrandManagementById(id);
    }
}
